﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Circle.Domain.Entity;
using Circle.Domain.Model;

namespace Circle.Domain.Interface.Service
{
    public interface IMembershipService : IBaseCircleService
    {
      

        MemberUser CreateEmptyUser();
        MemberRole CreateEmptyRole();
        MemberUser UpdatePassword(MemberUser user);

        bool IsAdminUser(MemberUser user);

        IQueryable<MemberUser> AllUsers { get; }
        IQueryable<MemberRole> AllRoles { get; }

        List<MemberUser> AllUserItems { get; }
        List<MemberRole> AllRoleItems { get; }

        IQueryable<MemberUser> GetUsersByRole(MemberRole role);
        IQueryable<MemberRole> GetRolesByUser(MemberUser user);

        MemberUser GetUser(Guid id);
        MemberRole GetRole(Guid id);

        OperationStatus SaveUser(MemberUser user);
        void SaveRole(MemberRole role);

        void DeleteUser(MemberUser user);
        void DeleteRole(MemberRole role);

        OperationStatus CreateUser(MemberUser newUser);

        bool CheckUserIdentity(string userName, string registerEmail);
        bool ValidateUser(string identifier, string password, out MemberUser user);

    }
}
